package com.study.test;

import com.study.config.MainConfigofLifeCycle;
import com.study.config.Test1;
import org.junit.Test;
import org.springframework.context.ApplicationContext;
import org.springframework.context.annotation.AnnotationConfigApplicationContext;

/**
 * @author wuwenbo
 * @date 2020/3/31 - 18:08
 */
public class IOCTest_LifeCycle {
    @Test
    public void test1(){
        AnnotationConfigApplicationContext  applicationContext = new AnnotationConfigApplicationContext(MainConfigofLifeCycle.class);
        System.out.println("容器初始化完成 ...");
        //关闭容器
        applicationContext.close();
    }

}
